<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>解构</title>
</head>

<body>

</body>
<script>
    let obj = { p: ['yuema', { y: 'buyue' }] };
    let { p: [x, { y }] } = obj;
    console.log(x, y)
    let { a, b, ...last } = { a: 10, b: 20, c: 30, d: 40 };
    console.log(last)
</script>

</html>